/*
 * Printer.h
 *
 *  Created on: 24/apr/2013
 *      Authors: Ialenti Andrea, Marangon Fabio
 */

#ifndef PRINTER_H_
#define PRINTER_H_

#include "StatusCodes.h"
#include "Types.h"

//	Output function to print graph nodes textually.
Status printNodes(const Graph *g, _IO_FILE *ch);

//	Output function to print graph cost matrix textually.
Status printCosts(const Graph *g, _IO_FILE *ch);

//	Output function to print 1-tree cost matrix textually.
Status printCostsTree(const OneTree *t, _IO_FILE *ch);

//	Output functions used to print a generic integer matrix.
Status printIntMatrix(int **mat, int rows, int cols, _IO_FILE *ch);

//	Output functions used to print a generic double matrix.
Status printDblMatrix(double **mat, int rows, int cols, _IO_FILE *ch);

//	Output function used to plot the graph.
Status plotGraph(const Config *cfg, const Graph *g, const char *fName);

//	Output function used to plot the CPLEX-genearated solution.
Status plotCPLEXSol(const Config *cfg, const double *x, const Problem *p, const Graph *g, const char *fName, const char *title, const char *color);

//	Output function used to plot the CPLEX-genearated solution (callback version).
Status plotCPLEXSubTours(const Config *cfg, const cbData *myData, const int *cLengths, int nCycles, const int *cycles, const char *fName, const char *title);

//	Output function used to plot a 1-tree (including the node 'v0').
Status plotOneTree(const Config *cfg, const OneTree *t, const char *fName, const char *title);

//	Output function used to plot a tour.
Status plotTour(const Config *cfg, const OneTree *t, const char *fName, const char *title, const char *color);

//	Output function used to plot the L(u) function.
Status plotFunction(const Config *cfg, const funcLu *f, const char *fName);

#endif /* PRINTER_H_ */
